import React, { useContext } from 'react'
import context from './context'
export default function Test() {
  // 接收context数据的组件,直接调用useContext,传入context对象,返回值就是context传递的数据
  const data = useContext(context)
  return <div>Test,{data}</div>
}
